<template>
	<uni-icons v-bind="iconProps"></uni-icons>
</template>

<script setup lang="ts">
	import { computed } from 'vue'
	interface Props {
		type : string
		size ?: number | string
		color ?: string
	}
	const props = withDefaults(defineProps<Props>(), {
		size: 22,
	})

	const iconProps = computed(() => {
		if (!props.type.startsWith('icon-')) {
			return props
		}
		return {
			...props,
			'custom-prefix': "iconfont"
		}

	})
</script>

<style lang="scss" scoped>

</style>